package com.cloudkinto.service.orderback;

import com.cloudkinto.entity.OrderBackDo;
import com.baomidou.mybatisplus.extension.service.IService;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.extentity.ReplaceBackCodeSkuDto;
import com.cloudkinto.service.orderback.vo.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author zhangyy
 * @since 2020-08-05
 */
public interface OrderBackService extends IService<OrderBackDo> {

    SingleResult addInit(Long userId,Long companyId);

    OrderBackAddReq add(OrderBackAddReq req, Long userId, Long companyId);

    void processorStorage(OrderBackProcessorStorageReq req,Long userId,Long companyId);

    void customerProcessing(OrderBackCustomerProcessingReq req,Long userId,Long companyId);

    int getUnDealCount(Long companyId);

    SingleResult updateInit(Long id, Long userId, Long companyId);

    OrderBackUpdateReq update(OrderBackUpdateReq updateVo, Long userId);

    int delete(Long id, Long userId);

    OrderBackDetailRes detail(Long id);

    SingleResult pageInit(Long shopId, Long companyId, Long currentUserId);

    List<OrderBackPageRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);

    SingleResult productType();

    Long openApiAdd(OrderBackOpenApiAddReq req, Long userId, Long companyId);

    Long openApiUpdate(OrderBackOpenApiUpdateReq req, Long userId);

    boolean openApiDelete(Long id, Long userId);

    void openApiCustomerProcessing(OrderBackOpenApiCustomerProcessingReq req, Long userId, Long companyId);

    void unclaimed(Long id, Long companyId);

    List<OrderBackDo> getUnDealList(String companyId);

    OrderBackSetTagRes settagInit(Long companyId);

    void settag(OrderBackSetTag tag, Long id, Long companyId);

    List<ErrorMsg> importFileForBack(MultipartFile file, Long userId, Long companyId);

    void downErrorMsgList(List<ErrorMsg> msgList, HttpServletResponse response);

   void exportBackOrder(Map<String, String> map, HttpServletResponse response);

    List<ReplaceBackCodeSkuDto> getBackCode(Long companyId);

    void applyExtension(Long id, Long userId);

    double getBackStorageFee(float size, int count, int day);
}
